package com.tgy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Arrays;

/***
 * @ClassName: Test
 * @Description:
 * @Auther: 送一一块二向箔
 * @Date: 17:36 2021/12/23
 * @version : V1.0
 */
@Controller
public class Test {
    @RequestMapping("aa")
    @ResponseBody
    public String aa(){
        return "test";
    }
    @RequestMapping("t1")
    public String t1(Model model){
        model.addAttribute("msg","<h1>helloWorld</h1>");
        model.addAttribute("users", Arrays.asList("小唐","小赵"));

        return "Thymeleaf";
    }

    @RequestMapping("index")
    public String t2(){
        return "index";
    }
}
